<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/js/jquery-3.1.1.min.js"></script>
    <script src="/js/vue.js"></script>
</head>
<body>
<div id="sss">
    <input name="username" v-model="user.sysName">
    <input name="password" v-model="user.sysPwd">
    <button type="button" @click="login()">登录</button>
    <a href="/web/register/register.html">注册</a>

    <h1>1234</h1>

</div>
</body>
<script>
    new Vue({
        el:"#sss",
        data:{
            user:{
                sysName:"xtc",
                sysPwd:"123456"
            }
        },
        methods:{
            login:function () {
                var self = this;
                console.log(123)
                $.ajax({
                    url:"shiro",
                    type:"post",
                    contentType:"application/x-www-form-urlencoded",
                    data:this.user,
                    dataType:"json",
                    success:function (data) {
                        console.log(data);
                        alert(data.info);
                        // if (data.info == "登录成功") {
                        //     window.location.href = "/admin/indexPage" ;
                        // }
                    }
                })
            }
        }
    })
</script>
</html>